﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<zeus.Core.Cliente>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">

    <h2>Cliente</h2>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Datos</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Nombre) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Nombre) %>
                <%: Html.ValidationMessageFor(model => model.Nombre) %>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.TipoDocumento) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("TipoDocumento") %>
                <%: Html.ValidationMessageFor(model => model.TipoDocumento) %>
            </div>
                                    
            <div class="editor-label">
                <%: Html.LabelFor(model => model.NumeroDocumento) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.NumeroDocumento) %>
                <%: Html.ValidationMessageFor(model => model.NumeroDocumento) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Compania) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Compania) %>
                <%: Html.ValidationMessageFor(model => model.Compania) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.CodigoIdioma) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("CodigoIdioma") %>
                <%: Html.ValidationMessageFor(model => model.CodigoIdioma) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.CodigoPais) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownList("CodigoPais") %>
                <%: Html.ValidationMessageFor(model => model.CodigoPais) %>
            </div>
                        
            <div class="editor-label">
                <%: Html.LabelFor(model => model.PalabraEmergencia) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.PalabraEmergencia) %>
                <%: Html.ValidationMessageFor(model => model.PalabraEmergencia) %>
            </div>
                        
            <p>
                <input type="submit" value="Guardar" />
                <%if (Model.Id > 0)
                  {%>
                <input type="button" onclick="javascript:eliminar(<%: Model.Id %>, '<%= ResolveUrl("~") %>Perfil/DeleteCliente', '<%= ResolveUrl("~") %>Perfil/Perfil')"
                    value="Eliminar" />                
                <%} %>
                <input type="button" onclick="javascript:document.location.href='<%= ResolveUrl("~") %>Perfil/Perfil'"
                    value="Cancelar" />
            </p>
        </fieldset>

    <% } %>      

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContentPlaceHolder" runat="server">
    <script type="text/javascript" src="<%= ResolveUrl("~") %>Scripts/MicrosoftAjax.js"></script>
    <script type="text/javascript" src="<%= ResolveUrl("~") %>Scripts/MicrosoftMvcAjax.js"></script>
    <script type="text/javascript" src="<%= ResolveUrl("~") %>Scripts/MicrosoftMvcValidation.js"></script>
    <script type="text/javascript" src="<%= ResolveUrl("~") %>Scripts/helpers.js"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            $("#navbar").hide();
        });
    </script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MenuContentPlaceHolder" runat="server">
</asp:Content>
